import config from "../../config"

class BusinessException extends Error {
  constructor(public message: string, public code: number = -1) {
    super(message)
    this.code = code || config.status.fail
    this.message = message
  }
}

export default BusinessException
